Left Termination of the query pattern perm_in_2(g, a) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

perm(Xs, .(X, Ys)) :- ','(app(X1s, .(X, X2s), Xs), ','(app(X1s, X2s, Zs), perm(Zs, Ys))).
perm([], []).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).
app([], Ys, Ys).

Queries:

perm(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f) (f,f)
app_in: (f,b,b) (f,b,f) (b,f,f) (f,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x2)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(Xs, .(X, Ys)) → U1_GA(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
PERM_IN_GA(Xs, .(X, Ys)) → APP_IN_AGG(X1s, .(X, X2s), Xs)
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → U4_AGG(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → U4_AGA(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_GA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → U4_GAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U4_AAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_GA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
PERM_IN_AA(Xs, .(X, Ys)) → APP_IN_AGA(X1s, .(X, X2s), Xs)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_AA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U4_AGG(x1, x2, x3, x4, x5)  =  U4_AGG(x5)
APP_IN_AGG(x1, x2, x3)  =  APP_IN_AGG(x2, x3)
U4_AGA(x1, x2, x3, x4, x5)  =  U4_AGA(x5)
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APP_IN_GAA(x1, x2, x3)  =  APP_IN_GAA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(Xs, .(X, Ys)) → U1_GA(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
PERM_IN_GA(Xs, .(X, Ys)) → APP_IN_AGG(X1s, .(X, X2s), Xs)
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → U4_AGG(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → U4_AGA(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_GA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → U4_GAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U4_AAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_GA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
PERM_IN_AA(Xs, .(X, Ys)) → APP_IN_AGA(X1s, .(X, X2s), Xs)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_AA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U4_AGG(x1, x2, x3, x4, x5)  =  U4_AGG(x5)
APP_IN_AGG(x1, x2, x3)  =  APP_IN_AGG(x2, x3)
U4_AGA(x1, x2, x3, x4, x5)  =  U4_AGA(x5)
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APP_IN_GAA(x1, x2, x3)  =  APP_IN_GAA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 15 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APP_IN_AAAAPP_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_IN_AAAAPP_IN_AAA

The TRS R consists of the following rules:none


s = APP_IN_AAA evaluates to t =APP_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN_AAA to APP_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APP_IN_AGA(Ys) → APP_IN_AGA(Ys)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_IN_AGA(Ys) → APP_IN_AGA(Ys)

The TRS R consists of the following rules:none


s = APP_IN_AGA(Ys) evaluates to t =APP_IN_AGA(Ys)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN_AGA(Ys) to APP_IN_AGA(Ys).





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))

The TRS R consists of the following rules:

app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x3)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa
[]  =  []
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AA(app_out_aga(X1s, Xs)) → U2_AA(Xs, app_in_gaa(X1s))
U2_AA(Xs, app_out_gaa) → PERM_IN_AA
PERM_IN_AAU1_AA(app_in_aga(.))

The TRS R consists of the following rules:

app_in_gaa(.) → U4_gaa(app_in_aaa)
app_in_gaa([]) → app_out_gaa
app_in_aga(Ys) → U4_aga(app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys)
U4_gaa(app_out_aaa(Xs)) → app_out_gaa
U4_aga(app_out_aga(Xs, Zs)) → app_out_aga(., .)
app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)

The set Q consists of the following terms:

app_in_gaa(x0)
app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_AA(app_out_aga(X1s, Xs)) → U2_AA(Xs, app_in_gaa(X1s)) at position [1] we obtained the following new rules:

U1_AA(app_out_aga([], y1)) → U2_AA(y1, app_out_gaa)
U1_AA(app_out_aga(., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa) → PERM_IN_AA
U1_AA(app_out_aga([], y1)) → U2_AA(y1, app_out_gaa)
PERM_IN_AAU1_AA(app_in_aga(.))
U1_AA(app_out_aga(., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))

The TRS R consists of the following rules:

app_in_gaa(.) → U4_gaa(app_in_aaa)
app_in_gaa([]) → app_out_gaa
app_in_aga(Ys) → U4_aga(app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys)
U4_gaa(app_out_aaa(Xs)) → app_out_gaa
U4_aga(app_out_aga(Xs, Zs)) → app_out_aga(., .)
app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)

The set Q consists of the following terms:

app_in_gaa(x0)
app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa) → PERM_IN_AA
U1_AA(app_out_aga([], y1)) → U2_AA(y1, app_out_gaa)
PERM_IN_AAU1_AA(app_in_aga(.))
U1_AA(app_out_aga(., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys)
U4_aga(app_out_aga(Xs, Zs)) → app_out_aga(., .)

The set Q consists of the following terms:

app_in_gaa(x0)
app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

app_in_gaa(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa) → PERM_IN_AA
U1_AA(app_out_aga([], y1)) → U2_AA(y1, app_out_gaa)
PERM_IN_AAU1_AA(app_in_aga(.))
U1_AA(app_out_aga(., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys)
U4_aga(app_out_aga(Xs, Zs)) → app_out_aga(., .)

The set Q consists of the following terms:

app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PERM_IN_AAU1_AA(app_in_aga(.)) at position [0] we obtained the following new rules:

PERM_IN_AAU1_AA(app_out_aga([], .))
PERM_IN_AAU1_AA(U4_aga(app_in_aga(.)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa) → PERM_IN_AA
U1_AA(app_out_aga([], y1)) → U2_AA(y1, app_out_gaa)
PERM_IN_AAU1_AA(U4_aga(app_in_aga(.)))
PERM_IN_AAU1_AA(app_out_aga([], .))
U1_AA(app_out_aga(., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys)
U4_aga(app_out_aga(Xs, Zs)) → app_out_aga(., .)

The set Q consists of the following terms:

app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa) → PERM_IN_AA
U1_AA(app_out_aga([], y1)) → U2_AA(y1, app_out_gaa)
PERM_IN_AAU1_AA(U4_aga(app_in_aga(.)))
PERM_IN_AAU1_AA(app_out_aga([], .))
U1_AA(app_out_aga(., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys)
U4_aga(app_out_aga(Xs, Zs)) → app_out_aga(., .)


s = PERM_IN_AA evaluates to t =PERM_IN_AA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

PERM_IN_AAU1_AA(app_out_aga([], .))
with rule PERM_IN_AAU1_AA(app_out_aga([], .)) at position [] and matcher [ ]

U1_AA(app_out_aga([], .))U2_AA(., app_out_gaa)
with rule U1_AA(app_out_aga([], y1)) → U2_AA(y1, app_out_gaa) at position [] and matcher [y1 / .]

U2_AA(., app_out_gaa)PERM_IN_AA
with rule U2_AA(Xs, app_out_gaa) → PERM_IN_AA

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f) (f,f)
app_in: (f,b,b) (f,b,f) (b,f,f) (f,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x3, x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1, x2, x3)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x3, x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1, x2, x3)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(Xs, .(X, Ys)) → U1_GA(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
PERM_IN_GA(Xs, .(X, Ys)) → APP_IN_AGG(X1s, .(X, X2s), Xs)
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → U4_AGG(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → U4_AGA(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_GA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → U4_GAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U4_AAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_GA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
PERM_IN_AA(Xs, .(X, Ys)) → APP_IN_AGA(X1s, .(X, X2s), Xs)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_AA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x3, x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1, x2, x3)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
U4_AGG(x1, x2, x3, x4, x5)  =  U4_AGG(x3, x5)
APP_IN_AGG(x1, x2, x3)  =  APP_IN_AGG(x2, x3)
U4_AGA(x1, x2, x3, x4, x5)  =  U4_AGA(x3, x5)
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APP_IN_GAA(x1, x2, x3)  =  APP_IN_GAA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(Xs, .(X, Ys)) → U1_GA(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
PERM_IN_GA(Xs, .(X, Ys)) → APP_IN_AGG(X1s, .(X, X2s), Xs)
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → U4_AGG(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGG(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → U4_AGA(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_GA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_GA(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → U4_GAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_GAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → U4_AAA(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_GA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_GA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
PERM_IN_AA(Xs, .(X, Ys)) → APP_IN_AGA(X1s, .(X, X2s), Xs)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → APP_IN_GAA(X1s, X2s, Zs)
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_AA(Xs, X, Ys, perm_in_aa(Zs, Ys))
U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x3, x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1, x2, x3)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
U4_AGG(x1, x2, x3, x4, x5)  =  U4_AGG(x3, x5)
APP_IN_AGG(x1, x2, x3)  =  APP_IN_AGG(x2, x3)
U4_AGA(x1, x2, x3, x4, x5)  =  U4_AGA(x3, x5)
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APP_IN_GAA(x1, x2, x3)  =  APP_IN_GAA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 15 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x3, x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1, x2, x3)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AAA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AAA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APP_IN_AAA(x1, x2, x3)  =  APP_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APP_IN_AAAAPP_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_IN_AAAAPP_IN_AAA

The TRS R consists of the following rules:none


s = APP_IN_AAA evaluates to t =APP_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN_AAA to APP_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x3, x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1, x2, x3)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_AGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_AGA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APP_IN_AGA(x1, x2, x3)  =  APP_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APP_IN_AGA(Ys) → APP_IN_AGA(Ys)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_IN_AGA(Ys) → APP_IN_AGA(Ys)

The TRS R consists of the following rules:none


s = APP_IN_AGA(Ys) evaluates to t =APP_IN_AGA(Ys)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN_AGA(Ys) to APP_IN_AGA(Ys).





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))

The TRS R consists of the following rules:

perm_in_ga(Xs, .(X, Ys)) → U1_ga(Xs, X, Ys, app_in_agg(X1s, .(X, X2s), Xs))
app_in_agg(.(X, Xs), Ys, .(X, Zs)) → U4_agg(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
U4_agg(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_agg(.(X, Xs), Ys, .(X, Zs))
app_in_agg([], Ys, Ys) → app_out_agg([], Ys, Ys)
U1_ga(Xs, X, Ys, app_out_agg(X1s, .(X, X2s), Xs)) → U2_ga(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
U2_ga(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_ga(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa(Xs, .(X, Ys)) → U1_aa(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))
U1_aa(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_aa(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
U2_aa(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → U3_aa(Xs, X, Ys, perm_in_aa(Zs, Ys))
perm_in_aa([], []) → perm_out_aa([], [])
U3_aa(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_aa(Xs, .(X, Ys))
U3_ga(Xs, X, Ys, perm_out_aa(Zs, Ys)) → perm_out_ga(Xs, .(X, Ys))
perm_in_ga([], []) → perm_out_ga([], [])

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
app_in_agg(x1, x2, x3)  =  app_in_agg(x2, x3)
.(x1, x2)  =  .
U4_agg(x1, x2, x3, x4, x5)  =  U4_agg(x3, x5)
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_out_agg(x1, x2, x3)  =  app_out_agg(x1, x2, x3)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, X, Ys, app_out_gaa(X1s, X2s, Zs)) → PERM_IN_AA(Zs, Ys)
U1_AA(Xs, X, Ys, app_out_aga(X1s, .(X, X2s), Xs)) → U2_AA(Xs, X, Ys, app_in_gaa(X1s, X2s, Zs))
PERM_IN_AA(Xs, .(X, Ys)) → U1_AA(Xs, X, Ys, app_in_aga(X1s, .(X, X2s), Xs))

The TRS R consists of the following rules:

app_in_gaa(.(X, Xs), Ys, .(X, Zs)) → U4_gaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_gaa([], Ys, Ys) → app_out_gaa([], Ys, Ys)
app_in_aga(.(X, Xs), Ys, .(X, Zs)) → U4_aga(X, Xs, Ys, Zs, app_in_aga(Xs, Ys, Zs))
app_in_aga([], Ys, Ys) → app_out_aga([], Ys, Ys)
U4_gaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_gaa(.(X, Xs), Ys, .(X, Zs))
U4_aga(X, Xs, Ys, Zs, app_out_aga(Xs, Ys, Zs)) → app_out_aga(.(X, Xs), Ys, .(X, Zs))
app_in_aaa(.(X, Xs), Ys, .(X, Zs)) → U4_aaa(X, Xs, Ys, Zs, app_in_aaa(Xs, Ys, Zs))
app_in_aaa([], Ys, Ys) → app_out_aaa([], Ys, Ys)
U4_aaa(X, Xs, Ys, Zs, app_out_aaa(Xs, Ys, Zs)) → app_out_aaa(.(X, Xs), Ys, .(X, Zs))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
app_in_aga(x1, x2, x3)  =  app_in_aga(x2)
U4_aga(x1, x2, x3, x4, x5)  =  U4_aga(x3, x5)
app_out_aga(x1, x2, x3)  =  app_out_aga(x1, x2, x3)
app_in_gaa(x1, x2, x3)  =  app_in_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
app_in_aaa(x1, x2, x3)  =  app_in_aaa
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
app_out_aaa(x1, x2, x3)  =  app_out_aaa(x1)
app_out_gaa(x1, x2, x3)  =  app_out_gaa(x1)
[]  =  []
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U1_AA(app_out_aga(X1s, ., Xs)) → U2_AA(Xs, app_in_gaa(X1s))
U2_AA(Xs, app_out_gaa(X1s)) → PERM_IN_AA
PERM_IN_AAU1_AA(app_in_aga(.))

The TRS R consists of the following rules:

app_in_gaa(.) → U4_gaa(app_in_aaa)
app_in_gaa([]) → app_out_gaa([])
app_in_aga(Ys) → U4_aga(Ys, app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys, Ys)
U4_gaa(app_out_aaa(Xs)) → app_out_gaa(.)
U4_aga(Ys, app_out_aga(Xs, Ys, Zs)) → app_out_aga(., Ys, .)
app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)

The set Q consists of the following terms:

app_in_gaa(x0)
app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0, x1)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_AA(app_out_aga(X1s, ., Xs)) → U2_AA(Xs, app_in_gaa(X1s)) at position [1] we obtained the following new rules:

U1_AA(app_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))
U1_AA(app_out_aga([], ., y1)) → U2_AA(y1, app_out_gaa([]))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa(X1s)) → PERM_IN_AA
PERM_IN_AAU1_AA(app_in_aga(.))
U1_AA(app_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))
U1_AA(app_out_aga([], ., y1)) → U2_AA(y1, app_out_gaa([]))

The TRS R consists of the following rules:

app_in_gaa(.) → U4_gaa(app_in_aaa)
app_in_gaa([]) → app_out_gaa([])
app_in_aga(Ys) → U4_aga(Ys, app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys, Ys)
U4_gaa(app_out_aaa(Xs)) → app_out_gaa(.)
U4_aga(Ys, app_out_aga(Xs, Ys, Zs)) → app_out_aga(., Ys, .)
app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)

The set Q consists of the following terms:

app_in_gaa(x0)
app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0, x1)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa(X1s)) → PERM_IN_AA
PERM_IN_AAU1_AA(app_in_aga(.))
U1_AA(app_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))
U1_AA(app_out_aga([], ., y1)) → U2_AA(y1, app_out_gaa([]))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa(.)
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(Ys, app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys, Ys)
U4_aga(Ys, app_out_aga(Xs, Ys, Zs)) → app_out_aga(., Ys, .)

The set Q consists of the following terms:

app_in_gaa(x0)
app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0, x1)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

app_in_gaa(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U2_AA(Xs, app_out_gaa(X1s)) → PERM_IN_AA
PERM_IN_AAU1_AA(app_in_aga(.))
U1_AA(app_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))
U1_AA(app_out_aga([], ., y1)) → U2_AA(y1, app_out_gaa([]))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa(.)
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(Ys, app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys, Ys)
U4_aga(Ys, app_out_aga(Xs, Ys, Zs)) → app_out_aga(., Ys, .)

The set Q consists of the following terms:

app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0, x1)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PERM_IN_AAU1_AA(app_in_aga(.)) at position [0] we obtained the following new rules:

PERM_IN_AAU1_AA(app_out_aga([], ., .))
PERM_IN_AAU1_AA(U4_aga(., app_in_aga(.)))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_AAU1_AA(app_out_aga([], ., .))
U2_AA(Xs, app_out_gaa(X1s)) → PERM_IN_AA
U1_AA(app_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))
PERM_IN_AAU1_AA(U4_aga(., app_in_aga(.)))
U1_AA(app_out_aga([], ., y1)) → U2_AA(y1, app_out_gaa([]))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa(.)
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(Ys, app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys, Ys)
U4_aga(Ys, app_out_aga(Xs, Ys, Zs)) → app_out_aga(., Ys, .)

The set Q consists of the following terms:

app_in_aga(x0)
U4_gaa(x0)
U4_aga(x0, x1)
app_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

PERM_IN_AAU1_AA(app_out_aga([], ., .))
U2_AA(Xs, app_out_gaa(X1s)) → PERM_IN_AA
U1_AA(app_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(app_in_aaa))
PERM_IN_AAU1_AA(U4_aga(., app_in_aga(.)))
U1_AA(app_out_aga([], ., y1)) → U2_AA(y1, app_out_gaa([]))

The TRS R consists of the following rules:

app_in_aaaU4_aaa(app_in_aaa)
app_in_aaaapp_out_aaa([])
U4_gaa(app_out_aaa(Xs)) → app_out_gaa(.)
U4_aaa(app_out_aaa(Xs)) → app_out_aaa(.)
app_in_aga(Ys) → U4_aga(Ys, app_in_aga(Ys))
app_in_aga(Ys) → app_out_aga([], Ys, Ys)
U4_aga(Ys, app_out_aga(Xs, Ys, Zs)) → app_out_aga(., Ys, .)


s = U1_AA(app_out_aga([], ., y1)) evaluates to t =U1_AA(app_out_aga([], ., .))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U1_AA(app_out_aga([], ., y1))U2_AA(y1, app_out_gaa([]))
with rule U1_AA(app_out_aga([], ., y1')) → U2_AA(y1', app_out_gaa([])) at position [] and matcher [y1' / y1]

U2_AA(y1, app_out_gaa([]))PERM_IN_AA
with rule U2_AA(Xs, app_out_gaa(X1s)) → PERM_IN_AA at position [] and matcher [Xs / y1, X1s / []]

PERM_IN_AAU1_AA(app_out_aga([], ., .))
with rule PERM_IN_AAU1_AA(app_out_aga([], ., .))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.